package org.dromara.generator.domain;

/**
 * 聚合枚举
 */
public enum SqlAgreeEnum {

    /**
     * 计数
     */
    AGREE_COUNT("count(", "1) counts"),
    /**
     * 计数id
     */
    AGREE_ID("count(", "id) counts_id"),
    /**
     * 计数*
     */
    AGREE_ALL("count(", "*) count_all"),
    /**
     * avg
     */
    AGREE_AVG("avg(IFNULL(", ",0)) avg_"),

    /**
     * sum
     */
    AGREE_SUM("sum(IFNULL(", ",0)) sum_"),
    /**
     * max
     */
    AGREE_MAX("max(IFNULL(", ",0)) max_"),
    /**
     * min
     */
    AGREE_MIN("min(IFNULL(", ",0)) min_"),

    ;

    private String agree;
    private String agree2;

    SqlAgreeEnum(
        String agree,
        String agree2) {
        this.agree = agree;
        this.agree2 = agree2;
    }

    public String getAgree() {
        return this.agree;
    }

    public String getAgree2() {
        return this.agree2;
    }
}
